package com.sqx.modules.tbOrders.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.tbOrders.entity.SysComplaint;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ComplaintDao extends BaseMapper<SysComplaint> {

    List<SysComplaint> selectComplaintList(Long userId);

    SysComplaint findComplaint(Long complaintId);

    BigDecimal deductMoneySum(String date, String dateType);

    IPage<SysComplaint> findAppComplaint(@Param("pages") Page<SysComplaint> pages,
                                         @Param("userId") Long userId,
                                         @Param("illegalId") Integer illegalId,
                                         @Param("complaintState") Integer complaintState,
                                         @Param("userName")String userName);



    IPage<SysComplaint> getUserComplaint(@Param("pages")Page<SysComplaint> pages,
                                         @Param("userId")Long userId,
                                         @Param("complaintState")Integer complaintState,
                                         @Param("userName")String userName);

    IPage<SysComplaint> findAllComplaint(@Param("pages") Page<SysComplaint> pages,
                                         @Param("complaint") SysComplaint complaint);
}
